package Work0519;

import java.util.Scanner;

public class GameTest {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("欢迎来到QuickHit:");
		Game ga = new Game();// 建个新游戏
		System.out.println("下面开始游戏");
		Player a = new Player("黑猪");// 建个新玩家
		for (int y = 1; y < 7; y++) {// 6次循环
			System.out.println("第" + y + "关开始");// 输出第几关
			for (int z = 0; z < LevelParam.levels[a.getLevelNo() - 1].getStrTimes(); z++) {// 输出多少次字符
				System.out.println("请输入:");
				String b = ga.printStr(a);// 接收随机字符串
				System.out.println(b);// 并输出
				String input = in.next();
				ga.printResult(b, input, a);// 确定是否有问题
				if (y != 6 && z == LevelParam.levels[a.getLevelNo() - 1].getStrTimes() - 1) {// 不是最后依次循环的话,并且答对对应等级所有字符串时,需要晋级难度
					System.out.println("恭喜晋级");
					a.play();
				}

			}
		}
		System.out.println("恭喜您通关了!");
	}
}
